home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / clarion.arc / TDES.HLP (.txt) < prev    next >
Clarion Help  |  1991-07-24  |  61KB  |  1,152 lines

  1. File Options
  2.   Filename
  3.   Prefix
  4.   Drive
  5.   Path
  6.      :\PHONES\
  7.   Create File  :Yes
  8. Yes  No
  9.   Reclaim Space:Yes
  10. Yes  No
  11.   Protect File :No
  12. Yes  No
  13.   Owner ID
  14.  The File Options page gathers information about the file  
  15.  we are creating.  We will call our file PHONEBK for phone 
  16.  book.  An extension of .DAT is assumed.
  17.  The Prefix is used with variable names as a shorthand name  
  18.  for a file. It can be up to 3 characters long and must be
  19.  unique for each file.  We will give our file a prefix of
  20.  PHN.  Fields in PHONEBK will look like PHN:NAME or PHN:ZIP. 
  21.  We will place our PHONEBK file on drive C in a 
  22.  sub-directory called \PHONES.
  23.  We want our file to be created automatically by the program. 
  24.  We will say yes to Reclaim Space so that new records will be 
  25.  placed in spaces created by deleted records.
  26.  We will not Protect the file or use an Owner ID.  (These are 
  27.  advanced topics described in the "Language Reference.")
  28.  This is the application worksheet.  The left column  
  29.  shows the files used by the application.  (MEMORY
  30.  contains memory variables--it is not a file.)  The
  31.  right column shows the procedures used by the appli- 
  32.  cation.  Procedures process screens, edit fields,
  33.  print reports, etc.  (MENU is the base procedure.
  34.  It is marked "ToDo" because we haven't done it yet.) 
  35.  The cursor arrow keys move the selector bar between  
  36.  the files and procedures column.
  37.  The right arrow key moves the 
  38.  bar to the Procedures column. 
  39.  And the left arrow key moves it back. 
  40.  We will start designing our application 
  41.  by setting up the data dictionary for
  42.  our file.
  43.  We press the Ins key to add a new file. 
  44. The CLARION Designer
  45.   Application
  46.   Model File
  47.   Help File
  48.   Base Procedure:
  49.  This is the Designer tutorial.  It should 
  50.  be viewed after the Environment tutorial. 
  51.  With Designer, you can develop an entire  
  52.  application by entering a data dictionary 
  53.  and "painting" screens and reports.
  54.  We are going to develop an application that 
  55.  displays, maintains, and prints a telephone 
  56.  directory.
  57.  Let's preview what we are about to develop. 
  58.  (The green "pop-ups" are help windows.)
  59.  This is Designer's base window.  The screen 
  60.  and report layouts and the data dictionary  
  61.  are accumulated in an application file.  We 
  62.  will call our application file PHONES.APP.  
  63.  (.APP is the default extension.)
  64.  Designer generates source code into a Model File.  We 
  65.  supply STANDARD.MDL for single user applications and  
  66.  NETWORK.MDL for multi-user.  You can customize these  
  67.  models if you wish.  We will use the standard model.  
  68.  All help windows for an application reside 
  69.  in a single help file.  The Help windows
  70.  for this application will reside in a file 
  71.  called PHONES.HLP.  (The .HLP is a default 
  72.  extension. The Helper tutorial will illus- 
  73.  trate the design of these windows.
  74.  An application consists of procedures and  
  75.  files.  The Base Procedure is the first
  76.  procedure called by an application.  The
  77.  base procedure of PHONES is a menu screen. 
  78.  We will name it MENU.
  79. Field
  80.   Field name :PHONE
  81.   Description:Telephone Number
  82.   Type
  83. :Decimal
  84.   Length
  85.   Places
  86.   Picture
  87.   Lower range:
  88.   Upper range:
  89.   Dimensioned:
  90.   Type Mode  :Ins
  91. Ins  Ovr  AsIs
  92.   Required
  93. Yes  No
  94.   Immediate  :No
  95. Yes  No
  96.   Num Lock
  97. Yes  No
  98.   Help ID
  99.  We will place the phone number in a 7-digit packed 
  100.  decimal variable.  Of course a phone number has no 
  101.  places to the right of the decimal point.
  102.  The picture of a numeric field is its display pattern.  Clarion offers
  103.  a wide variety of picture formats for displaying international dates,
  104.  times, and currency.  Pictures can also be used for scientific notation. 
  105.  Special pictures can be specified for fields such as telephone and 
  106.  social security numbers.  The display pattern is enclosed in "P"s. 
  107.  Pound signs (#) indicate digit positions and less than signs (<)
  108.  indicate digit positions that are "blank when zero".
  109.  Here is a special picture for a phone number without an area code. 
  110.  (Clarion pictures always start with an at sign (@).)
  111.  There are no upper and lower boundaries for a  
  112.  valid phone number.
  113.  And the phone number field is not dimensioned. 
  114.  The remaining fields are already set the way we want  
  115.  them.  Num Lock will be turned on and the number will 
  116.  be entered in Insert (push-left) mode.  This field is 
  117.  not required and is not immediate.
  118.  We press Ctrl-Enter to enter the whole screen without 
  119.  completing the remaining fields.
  120. Field
  121.   Field Name :
  122.   Description:
  123.   Type
  124.  The first field in our phone book file contains a name.
  125.  A field name can be up to twelve characters long and can  
  126.  contain letters, numbers, and the underscore character.
  127.  However, a field name must start with a letter.  We will  
  128.  call this field NAME.
  129.  Next we will enter a description of the field usage.  In  
  130.  this case: "Name".
  131. Field
  132.   Field Name :NAME
  133.   Description:Name
  134.   Type
  135. :String
  136.   Length
  137.   Picture
  138.   Choices
  139.   Dimensioned:
  140.   Type Mode  :AsIs
  141. Ins  Ovr  AsIs
  142.   Required
  143. Yes  No
  144.   Immediate  :No
  145. Yes  No
  146.   Num Lock
  147. Yes  No
  148.   Left Just  :Yes
  149. Yes  No
  150.   Upper Case :No
  151. Yes  No
  152.   Help ID
  153.  A string variable can be up to 255 characters long. 
  154.  We will make the NAME field 30 characters.
  155.  A Picture of a string field is its display length.  
  156.  If it is shorter than its true length, the display  
  157.  field scrolls horizontally to make room.  We will
  158.  use the default picture (its true length).
  159.  If the field is restricted to a set of choices, 
  160.  they are entered at "Choices:".
  161.  If the field is an array, the maximum subscript 
  162.  range is entered at "Dimensioned:".  (A field
  163.  can use up to four subscripts, creating a four  
  164.  dimension array.)
  165.  We would like the typing mode to stay "as is" for this field. 
  166.  Typing mode is set by the Ins key to insert or over-write.
  167.  NAME is a required field.  That is, it cannot be blank.
  168.  NAME is not an immediate field.  It must be entered with the  
  169.  Enter key.  An immediate field is automatically entered when  
  170.  its last character is typed.
  171.  We will not automatically turn on Num Lock for the NAME field. 
  172.  But we will left justify it to remove leading spaces.
  173.  And we will allow both upper and lower-case characters.
  174.  This application is so simple that we will not use a different 
  175.  help window for each field.
  176. String
  177. Decimal
  178. Short
  179. Group
  180.  This is the data type selection window. The  
  181.  up and down arrow keys move the selector bar 
  182.  over the desired data type.
  183.  A string data type is an alphanumeric field 
  184.  of specified length.
  185.  A decimal data type is a numeric field of
  186.  specified length with a specified number of 
  187.  decimal places.
  188.  The byte, short, and long data types are 1, 2,  
  189.  and 4-byte integers with the following ranges:  
  190. 0 to 256
  191. Short
  192. -32,768 to 32,767
  193. -2,147,483,648 to 2,147,483,647
  194.  The real data type is an 8-byte, floating point 
  195.  variable representing up to 15 decimal digits.  
  196.  The group data type permits consecutive fields 
  197.  to be treated as a single string variable.
  198.  The memo data type contains variable length
  199.  text, used for notes or comments.  Memo fields 
  200.  can also be used for graphic images such as
  201.  photographs.
  202.  For the NAME field, we will use a string 
  203.  data type.
  204. File: PHONEBK
  205. Prefix: PHN  
  206. Fields
  207.  ,Keys
  208. Ins to Add
  209. Enter to Change
  210. Del to Delete
  211.  This is the file worksheet for the PHONEBK file.  
  212.  The left column shows the fields that make up the 
  213.  PHONEBK file.  The right column shows the keys
  214.  and key fields for PHONEBK.
  215.  This completes our PHONEBK file.  To go back to  
  216.  the application summary screen we press the Ctrl 
  217.  and Enter keys at the same time.
  218.  Ctrl-Enter is the "screen enter" key--it updates 
  219.  the application file before it returns.
  220.  Ctrl-Esc is the "screen escape" key--it returns  
  221.  without updating (after your confirmation).
  222.  The cursor arrow keys move the selector bar 
  223.  among the keys and fields.  We will press
  224.  Ins to add our first field.
  225.  Now the PHONEBK file has one field.  In a  
  226.  similar manner, we add a few more fields.  
  227.  For the final field, we will add a phone number. 
  228.  As with the other fields, we press the Ins key.  
  229.  All the necessary fields have now been added to 
  230.  our PHONEBK file.  If we want a phone directory 
  231.  in alphabetical order, however,  we need a key  
  232.  for the file.
  233.  A key provides an alternate sequence for processing a file.
  234.  In our case, we want to view the phone directory entries in
  235.  alphabetical order without sorting them every time an entry
  236.  is added or changed.  Keys are organized as a tree structure  
  237.  in a separate file.  Each key entry points to a record in the 
  238.  main data file.
  239.  To add a key, we move the selector bar to  
  240.  the Keys column, and press the Ins key.
  241.  Now we have a key with no fields in it. 
  242.  To add a field, we press the Ins key.
  243.   Key/Index name:
  244.   Key/Index type:Key
  245. Key  Index
  246.   Unique Key
  247. Yes  No
  248. Auto-number :No
  249. Yes  No
  250.   Case Sensitive:No
  251. Yes  No
  252.   Exclude Nulls :No
  253. Yes  No
  254.   We will name our key NAME_KEY. 
  255.  A key file is updated every time a record changes.  An  
  256.  index file is not--it must be rebuilt every time it is  
  257.  used (if the file has changed since the last time).
  258.  An index file saves overhead if a key is used only once 
  259.  in a while, for instance, for a monthly report.
  260.  We want the PHONEBK key updated continuously.
  261.  Our key is not unique.  (Two entries can have the same name.) 
  262.  Unique keys can automatically number the key field.  (Since
  263.  our's is not unique we aren't given this option.
  264.  Our key is not case sensitive.  (We want upper and lower-case 
  265.  letters to sort together.)
  266.  And we can't have null keys.  (The NAME field is required.)
  267.  A key file is updated every time a record changes.  An  
  268.  index file is not--it must be rebuilt every time it is  
  269.  used (if the file has changed since the last usage).
  270.  An index file saves overhead if a key is only used
  271.  occasionally, for instance, for a monthly report.
  272.  We want the PHONEBK key updated continuously.
  273. Field of Key
  274.   Field Name:
  275.     "    -p
  276.  We can enter any field name.
  277.  Or we can press the Enter key with 
  278.  a blank field name to bring up the 
  279.  field lookup window.
  280.  PHN:NAME (String 30) - Name
  281.  PHN:ADDRESS (String 30) - Address
  282.  PHN:CITY_STATE (String 30) - City and State
  283.  PHN:ZIP (Long) - Zip Code 
  284.  PHN:PHONE (Decimal 7.0) - Telephone Number 
  285.  This is a field selection list.  We use 
  286.  the up and down arrow keys to choose a  
  287.  field.  Then we press the Enter key.
  288.  Press Enter to Print Directory 
  289.  Or Press Esc to Return to Menu 
  290. Select Field Type
  291.   For Entry  :
  292. Field
  293. Pause
  294.   For Display:
  295. Field
  296. Computed
  297. Lookup
  298. Conditional
  299.  We press Ctrl-F (for field) and select "Pause". 
  300.  We press Ctrl-F (for field) and select "Pause". 
  301. Menu Item
  302.   String
  303. :Press Enter to Print Directory
  304.   Procedure:PRINT_PHONES
  305.   Attribute:Bright White on Red
  306. Select :Bright White on Red
  307.  Now we enter a menu item to execute the  
  308.  report procedure (PRINT_PHONES).
  309.  Because there is only one menu item, we  
  310.  will make it the same color before and
  311.  after it is selected by the cursor keys. 
  312.   Procedure Name  :CHECK_PRINT
  313.   Procedure Title :Press Enter to Print Directory
  314.   Setup Procedure :
  315.   Next Procedure  :PRINT_PHONES
  316.   Filename
  317. :MEMORY
  318.   Secondary File  :
  319.   Help ID
  320.   Hot Procedure
  321. Hot Key
  322.   Combine with
  323.   Model Name
  324.  This is all we need for this procedure.  The form  
  325.  will contain one PAUSE field so that the Enter key 
  326.  will execute the Next Procedure (which prints our  
  327.  report).  We use MEMORY so that no file will be
  328.  updated.  We don't need a help window because all  
  329.  the operator options will be shown on the screen.  
  330.   Screen Color :Bright White on Red
  331.   Track Type
  332. :Double
  333. Single  Double  Block
  334.   Track Color  :Normal
  335.   Populate form:No
  336. Yes  No
  337.  We will use a red screen. 
  338. PAUSE
  339.   String
  340. :Or Press Esc to Return to Menu  
  341.   Edit
  342.   Attribute:Normal
  343.  We can use the operator instruction for the Esc
  344.  key as the PAUSE message.  Usually PAUSE messages
  345.  are only displayed after the last field is entered. 
  346.  But we don't have any entry fields, so the PAUSE
  347.  message is always displayed.
  348.      Press Enter to Print Directory
  349.  Now we add our PAUSE field.
  350.  A PAUSE field is optionally used on a form 
  351.  for confirmation before updating a record. 
  352.  After the last field is entered, the PAUSE 
  353.  message (such as: "Press Enter to Update") 
  354.  is displayed.  The operator presses Enter  
  355.  to continue or up arrow to change a field. 
  356.  Now we move our text to the center of 
  357.  the window (with Ctrl-M) and re-size  
  358.  (with Ctrl-W) around the text.
  359.  That completes the print confirmation 
  360.  procedure.  We press Ctrl-Enter.
  361. Update Directory
  362.   Name
  363.   Address
  364.   City State:
  365.   Zip
  366.   Telephone :
  367.   Procedure Name  :UPDATE_PHONE
  368.   Procedure Title :Update Directory
  369.   Setup Procedure :
  370.   Next Procedure  :
  371.   Filename
  372. :PHONEBK
  373.   Secondary File  :
  374.   Help ID
  375.      :FORM
  376.   Hot Procedure
  377. Hot Key
  378.   Combine with
  379.   Model Name
  380.  We fill out the Form Screen like this. 
  381.  "Next Procedure" is the procedure name 
  382.  of the next page of a multi-page form. 
  383.   Screen Color :Bright White on Red
  384.   Track Type
  385. :Double
  386. Single  Double  Block
  387.   Track Color  :Normal
  388.   Populate form:Yes
  389. Yes  No
  390.  For contrast against the blue scrolling table, 
  391.  we will give our update form a red background. 
  392.  We will request Designer to populate the form  
  393.  with fields.  Designer will place prompts and  
  394.  fields in a suitably shaped window.
  395. Update Directory
  396.   NAME
  397.   ADDRESS
  398.   CITY STATE:
  399.   ZIP
  400.   PHONE
  401.  This is about what we had in mind.  Field names  
  402.  are used for prompt words (replacing underscore  
  403.  characters with spaces).  The colons are aligned 
  404.  after the longest prompt.  And the window fits
  405.  snugly around the data.
  406.  But we prefer capitalized, not upper case, 
  407.  prompt words.  The Ctrl-\ key changes the  
  408.  case of the character under the cursor.
  409.  Also, we prefer "Zip Code" and "Telephone" 
  410.  to "ZIP" and "PHONE".
  411.  And remember that we use black on white for  
  412.  operator entry.  To change the field color,  
  413.  we press Ctrl-V to set the video attribute.  
  414.  Then we press Ctrl-A over each field to give 
  415.  it the new attribute.
  416.  That completes our form procedure. 
  417.  We press Ctrl-Enter to update the  
  418.  application file and return
  419. 1718192021
  420. Phone Directory
  421. Update Directory
  422. Print Directory
  423.      Quit
  424.  Here is our final menu screen.
  425.  To update the application file and return to the 
  426.  application summary screen, we press Ctrl-Enter. 
  427.   Procedure Name  :MENU
  428.   Procedure Title :
  429.   Setup Procedure :
  430.   Help ID
  431.   Hot Procedure
  432. Hot Key
  433.   Combine with
  434.   Model Name
  435.  The Procedure title is displayed at the top of the 
  436.  menu screen we are designing.  This title is also  
  437.  used as a description of the procedure.
  438.  We will title this screen "Phone Directory".
  439.  A setup procedure can be called by a procedure to  
  440.  "customize" itself.  Our menu procedure does not
  441.  need a setup procedure.
  442.  We will designate a help window called "MENU" to
  443.  be used with this procedure.  The MENU help window 
  444.  will be created in the Helper tutorial.
  445.  A hot procedure can be executed by the operator 
  446.  at any time by pressing a designated hot key.
  447.  MENU does not have a hot procedure.
  448.  We can combine this procedure in the same source module  
  449.  with any other procedure.  We choose not to do so.
  450.  Designer generates code into "model" procedures that can 
  451.  be customized.  If we want to generate code into a cus-  
  452.  tomized model procedure, the procedure is named here.
  453. Initialization
  454.   Screen Color :White on Black
  455.   Track Type
  456. :Double
  457. Single  Double  Block
  458.   Track Color  :Normal
  459.  We need to select our screen color  
  460.  from the video attribute window to  
  461.  the right.
  462.  We will press End and down arrow to 
  463.  select "Bright White on Blue".
  464.  The track is the graphic border around a screen.  Our  
  465.  choices are a thin single or double line, or a heavy
  466.  block line.  We will choose a thin double line that is 
  467.  the same color as the screen (NORMAL).
  468. Select Field Type
  469.   For Entry  :  Field
  470. Menu item
  471.   For Display:  Field
  472. Computed
  473. Lookup
  474. Conditional
  475.  At the cursor we can display a field from any file. 
  476.  Or we can display a computation involving fields. 
  477.  We can place an entry field for entering a 
  478.  new value into a field.
  479.  Or we can place a menu item to be 
  480.  used to select another procedure. 
  481.  We want a menu item.
  482.  Lookup fields display information from another file 
  483.  based on the value of the current record in memory  
  484.  from the primary file.
  485.  A conditional field displays information based on the 
  486.  result of a logical expression.
  487. Menu Item
  488.   String
  489.   Procedure:
  490.   Attribute:Normal
  491. Select :Reversed
  492.  For a menu item, we must specify a display 
  493.  string and a procedure to be called when
  494.  the display string is chosen.
  495.  Also, we can specify video attributes for  
  496.  the display string before and after it is  
  497.  selected with the cursor keys.
  498.  Our first menu item calls a scrolling table
  499.  that displays and optionally updates entries  
  500.  in the phone directory.
  501.  We will call the menu item 'Update Directory' 
  502.  and we will name the procedure SHOW_PHONES.
  503.  We will keep the video attribute the same as  
  504.  the screen color (Normal).
  505. Phone Directory
  506. Update Directory
  507. Print Directory
  508.  The left side of the window is now
  509.  ready for sizing.  We press the right 
  510.  arrow key to reduce the window on the 
  511.  left.  (The left arrow key expands
  512.  the window.)
  513.  To select the bottom of the window 
  514.  for sizing, we press the PgDn key. 
  515.  Then we press the up arrow key to  
  516.  reduce the window size.
  517.  And we press the End key to select the 
  518.  right side of the window for sizing.
  519.  The left arrow key reduces the window. 
  520.  We press the Enter key to complete 
  521.  the window-sizing process.
  522. Phone Directory
  523.  This is a menu screen worksheet.
  524.  To add a menu item at the cursor, use the
  525.  arrow keys to position the cursor and press 
  526.  the Ctrl and F keys at the same time.
  527.  (Ctrl-F stands for "field".)
  528.  Similarly, we will add two more menu items: 
  529.  The second item calls a procedure that asks 
  530.  for confirmation and then prints the phone  
  531.  directory.  We will call this confirmation  
  532.  procedure CHECK_PRINT.
  533.  The third item terminates the program.  We  
  534.  use the special procedure called RETURN.
  535.  This is a perfectly good menu screen; however, 
  536.  it isn't very attractive.  Let's pretty it up. 
  537.  We place the cursor over each menu item and  
  538.  press the Ctrl-6 key.  This centers the menu 
  539.  items in the window.  (The ^ symbol on the 6 
  540.  key suggests "center".)
  541.  So far so good,  but now let's paint the
  542.  area behind the menu items black on white. 
  543.  We will be using black on white wherever
  544.  operator entry is required.
  545.  To paint an area on the screen,  move the  
  546.  cursor to a corner of the rectangle to be  
  547.  painted. Then press the Ctrl-P key.
  548.  We use the cursor keys to paint a rectangle. 
  549.  When we are done, we press the Enter key.
  550.  (We press the Esc key to "undo" the paint.)  
  551.  Finally, we use the cursor keys to paint the
  552.  desired rectangle.  The Enter key finishes the 
  553.  "paint job".  (Esc removes the "paint".)
  554.  Now, as a final step, we will reduce 
  555.  the window to a more suitable size.  
  556.  To do so, we press Ctrl-W.
  557.   Select Type  
  558. Table
  559. Report
  560. Other
  561.  We want UPDATE_PHONE to be a form procedure. 
  562.  A form procedure is used to update fields in 
  563.  a single record.
  564.  CHECK_PRINT will be a form procedure with
  565.  no file and with a single PAUSE field.  The 
  566.  operator presses the Enter key to print the 
  567.  Directory or the Esc key to return to the
  568.  main menu.
  569.  PRINT_PHONES is a report procedure. 
  570.  We want SHOW_PHONES to be a table procedure. 
  571.  There are five different types of procedures. 
  572.  A table procedure displays multiple records 
  573.  on a screen.  The cursor and page control
  574.  keys are used to scroll the records.
  575.  A locator field can be used to jump to a
  576.  particular record.  And a selector field
  577.  can be used to select records from a file
  578.  (e.g., line items for a particular order).  
  579.  A form procedure displays multiple fields  
  580.  from a single record.  Form procedures are 
  581.  called from table procedures to update,
  582.  add, or delete records.
  583.  A report procedure prints a report. 
  584.  Other Procedures, written in the Clarion  
  585.  language without using Designer, can be
  586.  included in our application.
  587.  In addition, procedures written in other  
  588.  languages such as C or assembler language 
  589.  can also be included.
  590.  A menu procedure selects another procedure 
  591.  for execution.  This is the procedure type 
  592.  we want for our MENU procedure.
  593. Application: PHONES
  594. Files
  595.      Procedures
  596. MEMORY
  597. MENU (ToDo)
  598. Ins to Add
  599. Enter to Change
  600. Del to Delete
  601.  MENU (Menu) - Phone Directory
  602. SHOW_PHONES (ToDo)
  603. CHECK_PRINT (ToDo)
  604. RETURN
  605.  MENU (Menu) - Phone Directory
  606. SHOW_PHONES (Table) - Phone Directory
  607. UPDATE_PHONE (ToDo)
  608. CHECK_PRINT (ToDo)
  609. RETURN
  610.  MENU (Menu) - Phone Directory
  611. SHOW_PHONES (Table) - Phone Directory
  612. UPDATE_PHONE (Form) - Update Directory
  613. CHECK_PRINT (ToDo)
  614. RETURN
  615.  MENU (Menu) - Phone Directory
  616. SHOW_PHONES (Table) - Phone Directory
  617. UPDATE_PHONE (Form) - Update Directory
  618. CHECK_PRINT (Form) - Press Enter to Print Directory
  619. PRINT_PHONES (ToDo)
  620. RETURN
  621. PRINT_PHONES (Report) - Print Directory
  622.  Now that we have defined the file, it is time to define 
  623.  the procedures for our phone directory application.
  624.  One procedure (MENU) was named on the base page.  It is 
  625.  listed as a "ToDo", meaning it is not yet defined.
  626.  To do it, we select MENU and press the Enter key.
  627.  This completes the Designer tutorial.
  628.  The Helper tutorial should be viewed next. 
  629.  Now the application summary screen is starting 
  630.  to take form.  The procedures we added as menu 
  631.  items are shown as "to do" procedures that are 
  632.  called from the MENU procedure.
  633.  Next we will design the SHOW_PHONES procedure. 
  634.  We press the down arrow and Enter keys.
  635.  Now let's design the form procedure called UPDATE_PHONE. 
  636.  UPDATE_PHONE will be an update window that overlays our  
  637.  scrolling Phone Directory (SHOW_PHONES).
  638.  We select UPDATE_PHONE and press the Enter key.
  639.  Next we will design CHECK_PRINT.
  640.  This procedure will confirm a request to print the 
  641.  Phone Directory.  We need a confirmation screen so 
  642.  that the report is not printed by mistake because  
  643.  of a single wrong keystroke.
  644.  The only procedure we have left to do is PRINT_PHONES. 
  645.  The entire application is now complete.
  646.  To generate its source code, we press Ctrl-Enter. 
  647.  The source code for our Phone Directory application 
  648.  has been generated into files named PHONES.CLA and  
  649.  PHONES1.CLA through PHONES7.CLA.
  650.  These source files are now ready to be compiled.
  651.  We would normally press Shift-F7 to compile and
  652.  test this application.
  653. Select Field Type
  654. Field
  655. Computed
  656. Control
  657. Lookup
  658. Conditional
  659. Total
  660. Field
  661. Field Name:NAME
  662.  We can display 6 different kinds of fields on a  
  663.  report:
  664. a field from a file, a computed field, 
  665.  a conditional field, a printer control field,
  666.  a field looked up from a different file, or the  
  667.  total of a column.
  668.  We just want a field from the PHONEBK file.
  669.  We press Enter at Field Name: to get the field pop-up. 
  670.  Then we press Enter again to select the NAME field.
  671. Report
  672.   Procedure Name :PRINT_PHONES
  673.   Procedure Title:Phone Directory
  674.   Setup Procedure:
  675.   Access Key
  676. :NAME_KEY
  677.   Record Selector:
  678.   Record Filter  :
  679.   Page Length
  680. :  59
  681.   Report Device  :No
  682. Yes  No
  683.   Combine with
  684.   Model Name
  685.  We will title our report "Phone Directory".
  686.  We will be using the PHONEBK file in NAME_KEY sequence. 
  687.  And we will be printing 59 lines per page.
  688. Report Initialization
  689.   Populate Report:No
  690. Yes  No
  691.  We can populate a report just like we did the form 
  692.  screen.  Designer will center the title and place  
  693.  the field names over each column of the report.
  694.  Fields are positioned from left to right in the
  695.  order they are declared in the record.
  696.  We choose not to populate our report.
  697. $ Report Header 
  698. A Page
  699. Header 
  700.  !Phone Directory
  701.  pPHN:NAME
  702.  Group  Header 
  703. A Body
  704. Detail 
  705. PHN:NAME
  706.  Group  Footer 
  707. A Page
  708. Footer 
  709. A Report Footer 
  710.   1:1
  711.  0CHR OVR
  712.  PRINT_REPORTS is now complete.
  713.  We press Ctrl-Enter to update the application file 
  714.  and return to the application worksheet.
  715.  This is our report worksheet.  As you can see, a report can 
  716.  have a report header and footer (printed at the beginning
  717.  and end), a page header and footer (printed at the top and  
  718.  bottom), and a break header and footer (printed before and  
  719.  after a group of lines with the same column value).
  720.  Of course, reports need body detail lines that contain
  721.  information for each record in a file.
  722.  We will use a 6-line page header, a 2-line page footer,  
  723.  and a 3-line body detail.  To open up the space we need, 
  724.  we press the Enter key everywhere we want a new line.
  725.  OK, now let's add fields to our report.  We 
  726.  move the cursor to the top left of the body 
  727.  detail and press Ctrl-F (for field).
  728.  That's the NAME field.  Similarly, we will 
  729.  place the ADDRESS and PHONE fields.
  730.  Now we will put the CITY_STATE and ZIP 
  731.  fields on the line beneath ADDRESS.
  732.  That completes the Body Detail. Now
  733.  let's work on the Page Header.  First, 
  734.  we type in the column headings.
  735.  We need to move the report title down 2 lines. 
  736.  (You will see why in a minute.)  To do so, we  
  737.  move the cursor to the title and press Ctrl-M  
  738.  (for Move).  Then move the cursor through the  
  739.  title and press Enter (to "grab" it).  Now we  
  740.  press down arrow and Enter (to "deposit" it).  
  741.  Many printers support the PC's "line-draw" single 
  742.  and double-line graphic characters.  We will use  
  743.  Clarion's "Tracking" capability to draw a double- 
  744.  line box around our page header.  To do so, we
  745.  move the cursor to the left margin and press
  746.  Ctrl-T (for Track).
  747.  As a final step, we will print the page number at
  748.  the bottom of each page.  We do this by displaying  
  749.  the memory field MEM:PAGE.  MEM:PAGE was set up for 
  750.  us in the MEMORY file when we started PHONES.  This 
  751.  variable contains the current page number while a
  752.  report is printing.
  753. Table
  754.   Procedure Name  :SHOW_PHONES
  755.   Procedure Title :
  756.   Setup Procedure :
  757.   Update Procedure:
  758.   Access Key
  759.   Help ID
  760.   Record Selector :
  761.   Record Filter
  762.   Hot Procedure
  763. Hot Key
  764.   Combine with
  765.   Model Name
  766.  This screen is a scrolling table of names and phone
  767.  numbers.  We will title the screen "Phone Directory". 
  768.  There is no setup procedure.
  769.  The update procedure is a form procedure that is
  770.  called to add, change, or delete a PHONEBK record  
  771.  when the Ins, Enter, or Del key is pressed from
  772.  this table procedure.  Let's name it UPDATE_PHONE. 
  773.  We will access our file in NAME_KEY sequence. 
  774.  This entry can be selected from a list that
  775.  "pops-up" if nothing is entered.
  776.  We will use a help window called TABLE.
  777.  We will not be using any of the remaining 
  778.  options, so we press Ctrl-Enter.
  779. Table Initialization
  780.   Screen Color :Bright White on Blue
  781.   Track Type
  782. :Double
  783. Single  Double  Block
  784.   Track Color  :Normal
  785.  To match the MENU screen, we will make the table screen 
  786.  bright white on blue with a double track border.
  787. Phone Directory
  788. Select Field Type
  789.  Fixed Portion 
  790.   For Entry:
  791. Field
  792. Locator
  793.   For Display:  Field
  794. Computed
  795. Lookup
  796. Conditional
  797. Total
  798.  Scrolling Portion 
  799.   For Display:  Field
  800. Computed
  801. Lookup
  802. Conditional
  803.  A table screen is divided into two portions.
  804.  The scrolling portion is the area that contains  
  805.  scrolling fields.  Horizontally, this means from 
  806.  the first character of the leftmost field to the 
  807.  last character of the rightmost field.
  808.  The scrolling area is contained vertically from 
  809.  the top scrolling field down to the first fixed 
  810.  field or literal.  (A literal is a character
  811.  that is entered from the keyboard.)
  812.  The fixed portion is that part of the screen  
  813.  that is outside of the scrolling portion.
  814.  Entry fields and display fields can be placed 
  815.  in the fixed portion of a table screen.
  816.  A locator field is used to find the next record 
  817.  equal to or greater than an entered key value.  
  818.  We can display a field from any file.  Or we 
  819.  can display a computed value or the return
  820.  value of a function.
  821.  We cannot place entry fields in the scrolling portion. 
  822.  However, we can display a field, a computed value, a
  823.  conditional value, or we can look up a field in
  824.  another file.  (This feature is sometimes called
  825.  "joining" files.)
  826.  We just want to display the name field. 
  827.  A total field is the sum of all of the values from a field 
  828.  on this particular table.
  829.  A lookup field displays a value from another file where  
  830.  there is a relationship to the main file. (For example:  
  831.  loopup address information based on a client number from 
  832.  an order file.)
  833.  A conditional field displays information based on a
  834.  logical equation.
  835. Scrolling Display Field
  836.   File name :PHONEBK
  837.   Field name:
  838.  To select a field the easy way, 
  839.  just press the Enter key.
  840.  The NAME field is already selected. 
  841.  So just press the Enter key again.  
  842. Phone Directory
  843.  This is a table procedure worksheet.
  844.  We want to display a table of names and phone 
  845.  numbers from our PHONEBK file.  And we want
  846.  the cursor keys to scroll all the records in  
  847.  the file through this table.
  848.  To display a scrolling name field, move 
  849.  the cursor to the desired position and  
  850.  press Ctrl-F (for field).
  851.  In the same manner, we display the phone number. 
  852.  Now we will paint the scrolling portion 
  853.  black on white (we use the Ctrl-P key). 
  854.  Finally, we reduce the right side of the window (using Ctrl-W), 
  855.  we center the title (using Ctrl-6), and we are finished.
  856.  We press the Ctrl-Enter key to update the application 
  857.  file and return to the application summary screen.
  858. Mark block to be DELETED, then press Enter
  859. Mark block to PAINT, then press Enter
  860. The CLARION Designer
  861.      Warning - Global Data May Have Changed
  862.   Create Source Modules:All
  863. All  Partial  None  
  864. LK_UP_PAYEE (Table)
  865.  When generating source, you are given three choices: All,  
  866.  Partial, or None.  Select none if you will be changing this
  867.  application later and do not want to see your current work.
  868.  Select partial if you only changed some procedures and no  
  869.  files.  Select all if you this is the first time you work- 
  870.  on this application or if you change the files or added or 
  871.  deleted procedures.  A warning message will appear if you  
  872.  need to generate all of the source.
  873. Track Type
  874. Single
  875. Double
  876. Block
  877.  Mixed
  878.  Mixed
  879. ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?  
  880.   @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _  
  881.   ` a
  882.  This is the Track character selection window.  We can  
  883.  make tracks out of single lines, double lines, block
  884.  characters, single and double either way, or we can
  885.  propagate any other character.  We want a double line. 
  886. Keyin Attribute
  887. Black on White
  888. Normal
  889. Reversed
  890. Enhanced
  891. Rev+Enh
  892. Blink
  893. Rev+Blk
  894. Blk+Enh
  895.  Rev+Blk+Enh  
  896. Press B to toggle Blink
  897. / /!/"/#/$/%/&/'/(/)/*/+/,/-/.
  898. ?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>
  899. O@OAOBOCODOEOFOGOHOIOJOKOLOMON
  900. _P_Q_R_S_T_U_V_W_X_Y_Z_[_\_]_^
  901. o`oaobocodoeofogohoiojokolomon
  902. Paint Attribute
  903. Black on White
  904. Transparent
  905. Press B to toggle Blink
  906. Press T to toggle Transparent
  907. / /!/"/#/$/%/&/'/(/)/*/+/,/-/.
  908. ?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>
  909. O@OAOBOCODOEOFOGOHOIOJOKOLOMON
  910. _P_Q_R_S_T_U_V_W_X_Y_Z_[_\_]_^
  911. o`oaobocodoeofogohoiojokolomon
  912.  Now we use the cursor keys to  
  913.  select our paint color.  We
  914.  position the box over black on 
  915.  white and press the Enter key. 
  916. Screen Attribute
  917. White on Black
  918. Transparent
  919. Press B to toggle Blink
  920. Press T to toggle Transparent
  921. / /!/"/#/$/%/&/'/(/)/*/+/,/-/.
  922. ?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>
  923. O@OAOBOCODOEOFOGOHOIOJOKOLOMON
  924. _P_Q_R_S_T_U_V_W_X_Y_Z_[_\_]_^
  925. o`oaobocodoeofogohoiojokolomon
  926. Track Attribute
  927. Bright White on Blue
  928. Normal
  929. Reversed
  930. Enhanced
  931. Rev+Enh
  932. Blink
  933. Rev+Blk
  934. Blk+Enh
  935.  Rev+Blk+Enh
  936. Press B to toggle Blink
  937. / /!/"/#/$/%/&/'/(/)/*/+/,/-/.
  938. ?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>
  939. O@OAOBOCODOEOFOGOHOIOJOKOLOMON
  940. _P_Q_R_S_T_U_V_W_X_Y_Z_[_\_]_^
  941. o`oaobocodoeofogohoiojokolomon
  942. !AFIL    
  943. AFIL_W1 
  944. AFIL_W2 m
  945. AFIL_W2+
  946. AFIL_W3     
  947. APP_W1  q
  948. APP_W2  
  949. APP_W3  
  950. APP_W4  :    
  951. BACK    
  952. DES     T
  953. DES_W1  E
  954. DES_W2  P
  955. DES_W3  H
  956. DES_W3+ T
  957. DES_W4  a
  958. DES_W5  
  959. FFDEC   
  960. FFDEC_W1
  961. FFDEC_W2
  962. FFDEC_W3
  963. FFDEC_W4
  964. FFDEC_W5E
  965. FFLD    
  966. FFLD_W1 h
  967. FFSTR   
  968. FFSTR_W1
  969. FFSTR_W2m$
  970. FFSTR_W3
  971. FFSTR_W4?'
  972. FFTYP   
  973. FFTYP_W1
  974. FFTYP_W2Q*
  975. FFTYP_W3
  976. FFTYP_W4T+
  977. FFTYP_W5N,
  978. FFTYP_W6
  979. FFTYP_W7
  980. FIL     l.
  981. FIL_W1  
  982. FIL_W10 
  983. FIL_W2  '4
  984. FIL_W4  
  985. FIL_W5  H5
  986. FIL_W6  
  987. FIL_W7  
  988. FIL_W8  18
  989. FIL_W9  
  990. FKEY    -9
  991. FKEY_W1 
  992. FKEY_W2 e;
  993. FKEY_W3 
  994. FKEY_W9 
  995. FKFLD   "@
  996. FKFLD_W1
  997. FLST    
  998. FLST_W1 
  999. PCDON   
  1000. PCFLD   
  1001. PCFLD_W1 F
  1002. PCITM   vF
  1003. PCITM_W1 H
  1004. PCON1   $I
  1005. PCON1_W1+L
  1006. PCON2   
  1007. PCON2_W1-O
  1008. PCPAU   mO
  1009. PCPAU_W1
  1010. PCWRK   
  1011. PCWRK_W1DR
  1012. PCWRK_W2
  1013. PCWRK_W3@T
  1014. PFDON   
  1015. PFRM1   
  1016. PFRM1_W1
  1017. PFRM2   9Y
  1018. PFRM2_W1
  1019. PFWRK   
  1020. PFWRK_W1
  1021. PFWRK_W2
  1022. PFWRK_W3
  1023. PFWRK_W4
  1024. PMBOT1  R`
  1025. PMBOT2  
  1026. PMBOT3  
  1027. PMDON   
  1028. PMDON_W1
  1029. PMEN1   cb
  1030. PMEN1_W1
  1031. PMEN1_W2
  1032. PMEN1_W3Df
  1033. PMEN1_W4
  1034. PMEN1_W5
  1035. PMEN2   
  1036. PMEN2_W1[j
  1037. PMEN2_W22k
  1038. PMFLD   5l
  1039. PMFLD_W1
  1040. PMFLD_W2Pn
  1041. PMFLD_W3
  1042. PMFLD_W4
  1043. PMFLD_W5
  1044. PMFLD_W6Vp
  1045. PMITM   
  1046. PMITM_W10r
  1047. PMITM_W2]s
  1048. PMLFT1  
  1049. PMLFT2  &u
  1050. PMLFT3  Tu
  1051. PMRGT1  ru
  1052. PMRGT2  
  1053. PMWIN   
  1054. PMWIN_W1
  1055. PMWIN_W2py
  1056. PMWIN_W3-z
  1057. PMWIN_W4
  1058. PMWRK   <{
  1059. PMWRK_W1
  1060. PMWRK_W2
  1061. PMWRK_W3f~
  1062. PMWRK_W4
  1063. PMWRK_W5
  1064. PMWRK_W6
  1065. PMWRK_W7?
  1066. PMWRK_W8
  1067. PMWRK_W9
  1068. PPRC    >
  1069. PPRC_F1 i
  1070. PPRC_M2 
  1071. PPRC_R1 
  1072. PPRC_T1 B
  1073. PPRC_W1 
  1074. PPRC_W2 
  1075. PPRC_W3 _
  1076. PPRC_W4 .
  1077. PPRC_W5 x
  1078. PPRC_W6 
  1079. PRC     ;
  1080. PRC_O1  
  1081. PRC_O2  
  1082. PRC_O3  
  1083. PRC_O4  \
  1084. PRC_O5  P
  1085. PRC_W1  
  1086. PRC_W10 
  1087. PRC_W3  v
  1088. PRC_W4  Z
  1089. PRC_W5  
  1090. PRC_W6  
  1091. PRC_W7  
  1092. PRC_W8  _
  1093. PRC_W9  
  1094. PRFLD1  8
  1095. PRFLD2  _
  1096. PRFLD_W1
  1097. PRFLD_W2Q
  1098. PRPT1   
  1099. PRPT1_W1,
  1100. PRPT2   
  1101. PRPT2_W1
  1102. PRWRK1  N
  1103. PRWRK_10
  1104. PRWRK_W1
  1105. PRWRK_W2
  1106. PRWRK_W3_
  1107. PRWRK_W4
  1108. PRWRK_W5
  1109. PRWRK_W6
  1110. PRWRK_W7
  1111. PRWRK_W8
  1112. PRWRK_W91
  1113. PTBL1   
  1114. PTBL1_W1
  1115. PTBL1_W2
  1116. PTBL1_W3@
  1117. PTBL1_W4
  1118. PTBL2   
  1119. PTDON   
  1120. PTFLD   
  1121. PTFLD_W1
  1122. PTFLD_W2
  1123. PTFLD_W3
  1124. PTFLD_W4
  1125. PTFLD_W5H
  1126. PTFLD_W6
  1127. PTFLD_W7    
  1128. PTFLD_W8X
  1129. PTFLD_W9
  1130. PTSFL   %
  1131. PTSFL_W16
  1132. PTSFL_W2
  1133. PTWRK   
  1134. PTWRK1  
  1135. PTWRK_W1
  1136. PTWRK_W2&
  1137. PTWRK_W3
  1138. PTWRK_W4
  1139. PTWRK_W5
  1140. PTWRK_W68
  1141. SDEL    
  1142. SPNT    
  1143. SRC_GEN Y
  1144. SRC_W1  
  1145. TRK     
  1146. VBOX    
  1147. VKEY    
  1148. VPNT    }
  1149. VPNT_W1 v
  1150. VSCR     
  1151. VTRK    
  1152.